package org.meteorshower.employee_depart.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.ibatis.type.EnumTypeHandler;
import org.meteorshower.employee_depart.util.enum_util.TrainStatusEnum;

import java.io.Serializable;
import java.util.Date;

/**
 * 员工培训类，映射完成
 * @table train
 * */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("train")
public class EmpTrain implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableField("id")
    private String id;
    @TableField("e_id")
    private String eId;
    @TableField("train_start_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone ="GMT+8" )
    private Date trainStartDate;
    @TableField("train_finish_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone ="GMT+8" )
    private Date trainFinishDate;
    @TableField("train_content")
    private String trainContent;
    @TableField(value = "train_status",typeHandler = EnumTypeHandler.class)
    private TrainStatusEnum trainStatus;
    @TableField("train_remark")
    private String remark;
}